Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support listener attributes #3863

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

wweiwei-li
Copy link
Collaborator

@wweiwei-li wweiwei-li commented Sep 24, 2024

Issue

#3843

Description

Add listener attributes support by service.beta.kubernetes.io/aws-load-balancer-listener-attributes.${Protocol}-{Port} annotation, which allows dynamically configuration of protocol and port. With the combination of protocol and port, it serves as a unique identifier, enabling us to identify the listener and set attributes to it accordingly. For example, set
service.beta.kubernetes.io/aws-load-balancer-listener-attributes.TCP-80: tcp.idle_timeout.seconds=700

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 24, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 24, 2024
@wweiwei-li wweiwei-li force-pushed the listenerAttributes branch 2 times, most recently from a8a4a41 to cbe94e0 Compare September 24, 2024 18:14
@@ -354,3 +366,16 @@ func buildResListenerStatus(sdkLS ListenerWithTags) elbv2model.ListenerStatus {
ListenerARN: awssdk.ToString(sdkLS.Listener.ListenerArn),
}
}

var PROTOCOLS_WITH_ATTRIBUTES = map[elbv2model.Protocol]bool{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

  1. Define these constants at the beginning
  2. Change from var to const
  3. Change constant name to reflect listener attributes PROTOCOLS_SUPPORTING_LISTENER_ATTRIBUTES

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved 1 and 3.

  1. Defined it at the beginning
  2. Changed constant name to reflect listener attributes PROTOCOLS_SUPPORTING_LISTENER_ATTRIBUTES.

However, for 2. I can't set it as const because maps cannot be declared as constants in Go.

@M00nF1sh
Copy link
Collaborator

/lgtm
/approve
thanks for making this contribution, looks good to me :D

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: M00nF1sh, shraddhabang, wweiwei-li

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6965e9d into kubernetes-sigs:main Sep 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants